package cn.edu.sdjzu.xg.kcsj.domain;

import java.io.Serializable;

public class Faculty implements Comparable<Faculty>, Serializable {
    private Integer id;
    private String description;
    private String no;
    private Faculty parent;
    private boolean haveChild;

    public Faculty(Integer id, String description, String no, Faculty parent, boolean haveChild) {
        this.id = id;
        this.description = description;
        this.no = no;
        this.parent = parent;
        this.haveChild = haveChild;
    }



    @Override
    public int compareTo(Faculty o) {
        return this.id - o.id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public Faculty getParent() {
        return parent;
    }

    public void setParent(Faculty parent) {
        this.parent = parent;
    }

    public boolean isHaveChild() {
        return haveChild;
    }


    public void setHaveChild(boolean haveChild) {
        this.haveChild = haveChild;
    }

    @Override
    public String toString() {
        return "Faculty{" +
                "id=" + id +
                ", description='" + description + '\'' +
                ", no='" + no + '\'' +
                '}';
    }
}
